package com.siraz.questica.entities.items;

import java.io.Serializable;

public class Item implements Serializable
{
    public String name;
    public int icon;
    public int price;
    public int weight;
    public String effect = "";
    public boolean stackable;
    
    public Item() {
    	name = "item";
    	icon = 0;
    	price = 0;
    	weight = 0;
    	stackable = false;
    }
    
    public Item(String name, int icon, int price, int weight, boolean stackable)
    {
        this.name = name;
        this.icon = icon;
        this.price = price;
        this.weight = weight;
        this.stackable = stackable;
        
    }
    
    public String getName() {
    	return name;
    }
    
    public void setName(String name) {
    	this.name = name;
    }

    /*public Item(ItemData data)
    {
    	this.name = data.Name;
    	this.icon = data.Icon;
    	this.price = data.Price;
    	this.weight = data.Weight;
    	this.stackable = data.Stackable;
    }*/

    public int getIcon() {
		return icon;
	}

	public void setIcon(int icon) {
		this.icon = icon;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public boolean isStackable() {
		return stackable;
	}

	public void setStackable(boolean stackable) {
		this.stackable = stackable;
	}

	public Item Clone()
    {
        return new Item(name, icon, price, weight, stackable);
    }

    @Override
    public String toString()
    {
        String itemString = "";
        itemString += name + ", ";
        itemString += icon + ", ";
        itemString += price + ", ";
        itemString += weight + ", ";
        itemString += stackable;
        return itemString;
    }
}

